const mysqlConfig = require('../config/mysql-config')

const Sequelize = require('sequelize')
const sequelize = new Sequelize(mysqlConfig.dbname, mysqlConfig.uname, mysqlConfig.upwd, {
	host: mysqlConfig.host,
	dialect: mysqlConfig.dialect,
	pool: mysqlConfig.pool
})

sequelize
	.authenticate()
	.then(() => {
		console.log('successfully.');
	})
	.catch(err => {
		console.error('err:', err);
	});